//
//  UIView+Addition.h
//
//  i love nancy.
//  Created by starfish on 15/9/2.
//  Copyright (c) 2015年 小R. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIView (Addition)

//取得view宽/高
- (CGFloat)width;
- (CGFloat)height;
//取得view的上/下/左/右偏移
- (CGFloat)top;
- (CGFloat)bottom;
- (CGFloat)left;
- (CGFloat)right;
- (CGFloat)centerX;
//取得view的中心x/y坐标
- (CGFloat)centerY;
//设置view居中
- (void)setCenterX;
- (void)setCenter;

//设置宽/高/x/y
- (void)setWidth:(CGFloat)width;
- (void)setHeight:(CGFloat)height;
- (void)setXOffset:(CGFloat)x;
- (void)setYOffset:(CGFloat)y;

//设置原点在父视图的偏移
- (void)setOrigin:(CGPoint)origin;

//设置视图的尺寸
- (void)setSize:(CGSize)size;


@end
